//
//  NetGetPostsWithCache.h
//  KidReading
//
//  Created by Yinjialiang on 16/3/28.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBKeyDefine.h"

//点击获取更多所有类型
typedef enum : NSUInteger {
    GetMore_CollType_BookShelf = 0, //书架 -> BS
    GetMore_CollType_Cate,  //主题 -> C
    GetMore_CollType_Series,  //系列 -> S
    GetMore_CollType_Age,  //年龄 -> A
    GetMore_CollType_Grade,  //年级 -> G
    GetMore_CollType_Level,  //等级 -> LV
    
}GetMore_CollType;


//port
#define __port_server_login @"/api/server/user/login"  //登陆
#define __port_server_getAuthorInfo @"/api/server/user/authorInfo" //获取用户权限
#define __port_server_getHomePage @"/api/server/book/homePage350"  //获取首页信息
#define __port_server_getLibrary @"/api/server/book/home315" //获取书库信息
#define __port_server_getSpecialLibrary @"/api/server/book/special340"// 获取特殊书库
#define __port_server_getMore @"/api/server/book/more"  //获取更多图书
#define __port_server_getAdMore @"/api/server/book/media315" //获取广告位对应图书合集
#define __port_server_getCateList @"/api/server/cate/list"  //获取主题
#define __port_server_getLevelList @"/api/server/level/list"  //获取等级
#define __port_server_getGradeList @"/api/server/grade/list"  //获取年级
#define __port_server_getAgeList @"/api/server/age/list" //获取年龄
#define __port_server_getEnglishBook @"/api/server/book/en"  //获取英文图书列表
#define __port_server_getChineseBook @"/api/server/book/zh"  //获取中文图书列表
#define __port_server_getEnglishOrChineseBook @"/api/server/book/lang" //获取中英文列表
#define __port_server_getSeriesBookList @"api/server/book/series" //获取系列列表
#define __port_server_getGradeCN @"api/server/book/gradecn341"   //获取中国区域年级列表
#define __port_server_mergeMine @"/api/server/book/mergeMine"  //合并我的书架中的图书
#define __port_server_mergeFavor @"/api/server/book/mergeFavor"  //合并我的收藏中的图书
#define __port_server_mergeAudio @"/api/server/book/mergePlay"  //合并我的播放列表中的图书
#define __port_server_getFavorList @"/api/server/book/favorList"  //获取收藏的图书
#define __port_server_getHasRecommend @"/api/server/book/hasRecommend"  //获取是否有推荐
#define __port_server_getRecommendList @"/api/server/book/recommendList"  //获取推荐的图书
#define __port_server_getPayPage @"/server/pay/page"  //购买中英文Vip页面
#define __port_server_getPaymentRecording @"/api/server/payment/recording"  //获取购买记录
#define __port_server_getAppStoreCallBack @"/api/server/pay/appstoreCallback"  //支付回调
#define __port_server_getConfig @"/api/config/getConfig"  //获取配置信息
#define __port_server_favorUpdate @"/api/book/favorUpdate"  //修改用户收藏
#define __port_server_similarUpdate @"/api/server/book/similar"  //阅读器内相似图书推荐
#define __port_server_getExploreData @"/api/server/explore"  //发现页面
#define __port_server_getPublisherData @"/api/server/book/publisher315"  //出版社
#define __port_server_getSearchResults @"/api/server/book/search315"  //搜索
#define __port_server_getBookOfOriginalSeries @"/api/server/bookarticle/originalBookList" //原生系列
#define __port_server_getBookOfCodePage @"/apiweb/server/code/page" //活动码
#define __port_server_getNoticeList @"/api/server/notice/list"  //获取notice
#define __port_server_getPopUp  @"/api/server/getPopups"    //获取弹屏

#define __port_server_operateRecording @"/api/server/ugc/operateRecording"  //同步录音
#define __port_server_deleteRecording @"/api/server/ugc/deleteRecording"  //删除整本书录音
#define __port_server_getRankList @"/api/server/book/getReadingRank"  //获取排行榜
#define __port_server_shareToExplore @"/api/server/ugc/saveShareAudio" //分享到发现
#define __port_server_getBookHouseData @"/api/server/book/house" //获取小书房首页
#define __port_server_shareOthers @"/api/server/ugc/sharedOther" //分享到第三方
#define __port_server_filterInit  @"/api/server/book/filter/init" //初始化筛选项
#define __port_server_filterOpchg  @"/api/server/book/filter/opchg" //筛选项变更
#define __port_server_filterList   @"/api/server/book/filter/list"  //筛选图书
#define __port_server_getOneBook    @"/api/server/book/one"     //单本书架
#define __port_server_savePicture @"api/ugc/picture/save"    //上传UpYun成功后通知服务器
#define __port_server_sharePhotoToExplore @"api/ugc/picture/share" //将照片分享到发现
#define __port_server_getPhotoBorderStyle @"/api/ugc/plugin/frames"   //获取照片边框样式
#define __port_server_getUserReadingStat @"/api/server/book/getUserReadingStatistic" //获取阅读记录
#define __port_server_getRadioEvalResult @"/api/server/book/radioEval" //获取某页的评测结果或者上传评测结果
#define __port_server_catchGost @"/api/oper/hw/catch"     //捉鬼接口
#define __port_server_aboutMeUinfo  @"/api/server/userstate/info"   //我页面获取用户信息
#define __port_server_getRecommendMore @"/api/server/book/recommMore350"  //获取推荐更多页
#define __port_server_getMoreTalentRank @"/api/server/userscore/rank/yayaBean" //获取达人榜更多
#define __port_server_getMoreNews @"/api/server/user/news" //获取下拉刷新动态
#define __port_server_myGrowth  @"/api/server/user/growth"  //我的成长
#define __port_server_getUserFans   @"/api/server/userfollow/getUserFollowerList"   //用户粉丝列表
#define __port_server_getUserFollows    @"/api/server/userfollow/getUserFollowedList"   //用户关注列表
#define __port_server_follwsAction  @"/api/server/userfollow/followUser"    //关注或着取消关注
#define __port_server_getStoryCardList  @"/api/server/storycard/getStoryCardList" //获取故事卡列表
#define __port_server_getStoryCardInfo  @"/api/server/storycard/getStoryCardInfo" //获取故事卡相信信息
#define __port_server_inviteHistory @"/api/server/userfollow/getInviteFriendList"   //获取邀请好友列表
#define __port_server_inviteFirend  @"/api/server/userfollow/inviteFriend"  //邀请好友
#define __port_server_getBookReadFuncInfo @"/api/server/book/getBookReadInfo"  //获取功能页数据
#define __port_server_getMyWawaCoin  @"/api/server/userscore/getUserWawaCoin"  //获取当前WaWa币
#define __port_server_getUserDesign @"/api/server/user/creation"    //获取用户创作
#define __port_server_getMoreDesign @"/api/server/user/creationMore" //获取用户更多创作
#define __port_server_availableStoryCard @"/api/server/storycard/getAvailableStoryCard"//获取本书可以获得故事卡
#define __port_server_getBookStoryCardSuccess @"/api/server/storycard/gainStoryCard" //成功获取书内故事卡
#define __port_server_getVipSetup   @"/api/server/userscore/getWawacoinExchangeVipList" //获取兑换vip配置信息
#define __port_server_exchangeVip   @"/api/server/userscore/exchangeVipWawaCoin"    //兑换vip
#define __port_server_rewardWYAction @"/api/server/userscore/rewardAction" //获得wawa币yaya豆奖励
#define __port_server_shareReward @"/api/server/userreward/rewardUser"  //分享或评分vip奖励
#define __port_server_getUserRankInfo @"/api/server/userscore/rank/getUserRankInfo" //获取用户等级信息
#define __port_server_getOthersBook @"/api/server/book/getOthers"   //获取他人的图书
#define __port_server_getOthersFavor @"/api/server/book/getOthersFavor" //获取他人的收藏图书
#define __port_server_searchFllowed @"/api/server/userfollow/searchUserFollowedList" //搜索用户关注列表
#define __port_server_serarchFan @"/api/server/userfollow/searchUserFollowerList" //搜索用户粉丝列表
//签到
#define __port_server_getProbablyRewards @"/api/server/sign/bfsign" //获取今日可能获取的大奖
#define __port_server_getTodayReward @"/api/server/sign/signin" //点击签到获取今天的奖励
#define __port_server_knowledgeLike @"/api/server/sign/likekn" //小知识点赞
#define __port_server_cumulativeSignReward @"/api/server/sign/cmlreward" //累计签到奖励
#define __port_server_scanCode  @"/api/server/scancode/identifyCode"    //扫一扫识别激活码和isbn码
#define __port_server_activityCodeUse @"/api/server/scancode/activateScanCode"  //激活码使用
#define __port_server_bookDefine @"/api/server/book/define" //自定义结构图书信息
#define __prot_server_getReaderInsideOperInfo @"/api/server/book/getOperInfo"  //获取阅读器内活动内容
//订单查询
#define __port_server_getUserOrderList @"/api/server/odb/getUserOrderList"  //获取订单列表
#define __port_server_getBookArticleList    @"/api/server/bookarticle/list" //获取作品列表
//第三方支付
#define __port_server_WeChatPayOrder    @"/api/server/pay/wx/creord" //获取作品列表
#define __port_server_refundPayment    @"/api/server/odb/refundPayment" //获取作品列表

//keyId
#define __keyId_port_login @"keyId_JR_login"  //登陆
#define __keyId_port_getAuthorInfo @"keyId_JR_authorInfo" //获取用户权限
#define __keyId_port_getHomePage @"keyId_JR_getHomePage"  //获取首页信息
#define __keyId_port_getLibrary @"keyId_JR_Library" //获取书库信息
#define __keyId_port_getSpecialLibrary @"keyId_JR_getSpecialLibrary"// 获取特殊书库
#define __keyId_port_getMore @"keyId_JR_more"  //获取更多图书
#define __keyId_port_getAdMore @"keyId_JR_ad" //获取广告位对应图书合集
#define __keyId_port_getCateList @"keyId_JR_cateList"  //获取主题
#define __keyId_port_getLevelList @"keyId_JR_levelList"  //获取等级
#define __keyId_port_getGradeList @"keyId_JR_gradeList"  //获取年级
#define __keyId_port_getAgeList @"keyId_JR_ageList"   //获取年龄
#define __keyId_port_getEnglishBook @"keyId_JR_englishBook"  //获取英文图书列表
#define __keyId_port_getChineseBook @"keyId_JR_chineseBook"  //获取中文图书列表
#define __keyId_port_getEnglishOrChineseBook @"keyId_JR_lang" //获取中英文列表
#define __keyId_port_getSeriesBookList @"keyId_JR_series" //获取系列列表
#define __keyId_port_getGradeCN  @"keyId_JR_gradeCN"    //获取中国区域年级列表
#define __keyId_port_mergeMine @"keyId_JR_mergeMine"  //合并我的书架中的图书
#define __keyId_port_getFavorList @"keyId_JR_favorList"  //获取收藏的图书
#define __keyId_port_getHasRecommend @"keyId_JR_hasRecommend"  //获取是否有推荐
#define __keyId_port_getRecommendList @"keyId_JR_recommendList"  //获取推荐的图书
#define __keyId_port_getPayPage @"keyId_JR_payPage"  //购买中英文Vip页面
#define __keyId_port_getPaymentRecording @"keyId_JR_paymentRecording"  //获取购买记录
#define __keyId_port_getAppStoreCallBack @"keyId_JR_appstoreCallback"  //支付回调
#define __keyId_port_getConfig @"keyId_JR_getConfig"  //获取配置信息
#define __keyId_port_getNotice @"keyId_JR_noticeList"  //获取公告列表
#define __keyId_port_favorUpdate @"keyId_JR_favorUpdate"  //修改用户收藏
#define __keyId_port_similarUpdate @"keyId_JR_similarUpdate"  //修改用户收藏
#define __keyId_port_getExploreData @"keyId_JR_explore"  //发现页面
#define __keyId_port_getPublisherData @"keyId_JR_publisher315"  //出版社
#define __keyId_port_getSearchResults @"keyId_JR_search315"  //搜索
#define __keyId_port_getBookOfOriginalSeries @"keyId_JR_OriSeries" //原生系列
#define __keyId_port_getRankList @"keyId_JR_getReadingRank"  //获取排行榜
#define __keyId_port_getBookHouseData @"keyId_JR_getBookHouseData" //获取小书房首页
#define __keyId_port_filterInit @"keyId_JR_filterInit" //初始化筛选项
#define __keyId_port_filterOpchg  @"keyId_JR_filterOpchg" //筛选项变更
#define __keyId_port_filterList  @"keyId_JR_filterList" //筛选图书
#define __keyId_port_getOneBook  @"keyId_JR_getOneBook" //获取单本书架
#define __keyId_port_getPhotoBorderStyle @"keyId_JR_getPhotoBorderStyle"   //获取照片边框样式
#define __keyId_port_getUserReadingStat @"keyId_JR_getUserReadingStatistic" //获取阅读记录
#define __keyId_port_aboutMeUinfo  @"keyId_JR_aboutMeUinfo"   //我页面获取用户信息
#define __keyId_port_getRecommendMore @"keyId_JR_getRecommendMore" //获取首页推荐更多
#define __keyId_port_getMoreTalentRank @"keyId_JR_getMoreTalentRank" //获取达人榜更多
#define __keyId_port_myGrowth   @"keyId_JR_getMyGrowth" //我的成长
#define __keyId_port_getUserFans    @"keyId_JR_getUserFansList" //粉丝列表
#define __keyId_port_getUserFollows @"keyId_JR_getUserFollowList"   //关注列表
#define __keyId_port_UserFollowAction   @"keyId_JR_UserFollowsAction"   //关注或者取消关注
#define __keyId_port_getStoryCardList  @"keyId_JR_getStoryCardList" //获取故事卡列表
#define __keyId_port_getStoryCardInfo  @"keyId_JR_getStoryCardInfo" //获取故事卡相信信息
#define __keyId_port_getInviteHistroy   @"keyId_JR_getInviteHistory"    //邀请好友列表
#define __keyId_port_getBookReadFuncInfo @"keyId_JR_getBookReadFuncInfo"  //获取功能页数据
#define __keyId_port_getUserDesign  @"keyId_JR_getUserDesign"   //获取用户创作
#define __keyId_port_getMoreDesign  @"keyId_JR_getMoreDesign"   //获取更多创作
#define __keyId_port_getVipSetup    @"keyId_JR_getVipSetUp" //vip兑换配置信息
#define __keyId_port_getTodayReward @"keyId_JR_getTodayReward"  //获取今日奖励
#define __keyId_port_getOtherBook   @"keyID_JR_getOtherBook"    //获取他人图书
#define __keyId_port_getOtherFavor  @"keyID_JR_getOtherFavor"   //获取他人收藏
#define __keyId_port_getBookDefine  @"keyID_JR_getBookDefine"   //获取自定义结构图书信息
//
#define __keyId_port_getUserOrderList @"keyId_JR_getUserOrderList" //获取订单列表
#define __keyId_port_getBookArticleList @"keyID_JR_getBookArticleList"  //获取作品列表

@interface NetGetPostsWithCache : NSObject

+ (NetGetPostsWithCache *)shareInstance;


//登陆
- (void)loginJRSuccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取用户权限
- (void)getAuthorInfoFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取首页数据
-(void)getHomePageFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict, BOOL onlyCache))cacheBack;

//获取书库信息
-(void)getLibraryFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取特殊书库信息
-(void)getSpecialLibraryFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取更多图书
-(void)getMoreBooksFromNetWithCollType:(NSString*)collType CollValue:(NSString *)collValue BookLang:(NSString*)bookLang PageIndex:(NSInteger)pageIndex OrderBy:(NSString*)orderBy Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取广告位对应图书合集
-(void)getAdBooksFromNetWithAdtype:(NSInteger)adType AdID:(NSInteger)adId PageIndex:(NSInteger)pageIndex OrderBy:(NSString*)orderBy Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取主题
-(void)getCateListFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取等级
-(void)getLevelListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取年级
-(void)getGradeListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取年龄
- (void)getAgeListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取中国区域年级列表
-(void)getGradeCNListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取中英文图书(more类型/带分页)
-(void)getZHOrEnBookListFromNetWithBookLang:(NSString*)bookLang OrderBy:(NSString*)orderBy PageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取系列列表
-(void)getSeriesBookListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//合并我的书架中的图书
-(void)mergeMineWithData_timestamp:(long long)data_timestamp MergeType:(NSInteger)mergeType UpdateArray:(NSArray*)updateArray DeleteArray:(NSArray*)deleteArray Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//获取收藏的图书
-(void)getFavorListFromNetWithTargetUserId:(NSInteger)targetUid success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取是否有推荐
-(void)getHasRecommendFromNetSuccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取推荐的图书
-(void)getRecommendListFromNetWithTargetUid:(NSInteger)targetUid role:(RecommendRoleType)roleType PageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//支付回调
-(void)getPayBackWithParams:(NSDictionary *)params FromNetSuccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取配置信息
-(void)getConfigFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取配置信息缓存
-(void)getConfigCacheSuccess:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//修改用户收藏
-(void)favorUpdateWithType:(BOOL)addOrDel BookId:(NSInteger)bookId Success:(void (^)(BOOL add_noDel, BOOL IsSuccess))success failure:(void (^)(BOOL add_noDel, BOOL IsSuccess))failure;
//阅读器内图书推荐相似图书
-(void)readSimilarBookListForBookid:(NSInteger)bookid Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//出版社
-(void)getPublisherListFromNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//发现
-(void)getExploreDataFromNetSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//搜索(其他小朋友都在读)
-(void)getSearchResults_OtherKidsReadingFormNetWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//搜索(按字段匹配)
-(void)getSearchResultsWithKeyWord:(NSString*)keyWord PageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//原生系列
-(void)getOriginSeriesWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//notice请求
- (void)getNoticeSuccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//获取弹屏
- (void)getPopupsSuccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//与服务器同步语音List(通过文件目录添加删除)
- (void)operateRecordWithBookId:(NSInteger)bookId SaveList:(NSArray*)saveList DeleteList:(NSArray*)deleteList Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//删除整本书录音
-(void)deleteBookAllPageRecordWithBookId:(NSInteger)bookId Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//获取排行榜
//int rtype 排行范围(1：班级排行；2：学校排行；3：国家排行；0：全部)
-(void)getRankListWithRankId:(NSInteger)rankId Range:(NSString*)range Rtype:(NSNumber *)rtype Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//分享到发现
-(void)shareToExploreWithBookId:(NSInteger)bookId ActCode:(NSString*)actCode ShareTitle:(NSString*)shareTitle Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//分享到第三方
-(void)shareToOthersWithBookId:(NSInteger)bookId Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//获取小书房首页
-(void)getBookHouseDataWithTargetID:(NSInteger)targetID Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//只获取小书房的缓存
-(void)getBookHouseCacheBack:(void (^)(NSDictionary* retDict))cacheBack;

//初始化筛选项
- (void)getFilterInitDataSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//筛选项变更
- (void)getFilterOpchgDataWithPara:(NSDictionary *)para Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//筛选图书
- (void)getFilterListWithPara:(NSDictionary *)para success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//单本书架
- (void)getOneBookWithBookId:(NSInteger)bookId success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//清除首页的五分钟限制时间
- (void)cleanHomePageLimitedDate_once;

//保存读书后的图像
-(void)storePathForPhotoInUpYunWithActivityId:(NSInteger)activityId PathArray:(NSArray*)pathArray Success:(void (^)(NSDictionary* retDict))success Failure:(void (^)(NSError* error))failure;
-(void)cancelUploadPhotoPath;
//照片分享到发现
-(void)sharePhotoToExplorWithBookId:(NSInteger)bookId ActivityId:(NSInteger)activityId HurdleNo:(NSInteger)hurdleNo Success:(void (^)(NSDictionary* retDict))success Failure:(void (^)(NSError* error))failure;
//获取照片边框 精灵 样式
-(void)getPhotoBorderStyleAndSpritImageWithBookId:(NSInteger)bookId Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取阅读统计
-(void)getUserReadingStatFromNetWithtargetId:(NSInteger)targetId Rtime:(NSString*)rtime F:(NSInteger)f Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//上传评测结果或者获取某一页的全部评测结果
-(void)updateOrGetOnePageRadioEvalsWithBookId:(NSInteger)bookId PageIndex:(NSInteger)pageIndex EvalJsonStr:(NSString*)evalJsonStr Success:(void (^)(NSDictionary* retDict))success Failure:(void (^)(NSError* error))failure;
//捉鬼接口
-(void)cacheGostWithGID:(NSInteger)gid Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//我页面获取用户信息
- (void)aboutMeGetUinfoWithTargetUid:(NSInteger)targetUid success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取推荐更多图书
-(void)getRecommendMoreBooksFromNetWithPageIndex:(NSInteger)pageIndex OrderBy:(NSString*)orderBy Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取达人榜更多
-(void)getTalentRankListWithCodeType:(NSString*)codeType Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//下拉获取动态
-(void)getMoreNewsFromNetWithDirect:(NSInteger)direct IndexId:(NSInteger)indexId Success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//获取我的成长
- (void)getMyGrothWithTargetUid:(NSInteger)targetUid success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取用户粉丝列表
- (void)getUserFansListWithTargetUid:(NSInteger)targetUid page:(NSInteger)page success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取用户关注列表
- (void)getUserFollowsListWithTargetUid:(NSInteger)targetUid page:(NSInteger)page success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//关注或者取消关注
- (void)userFollowsAcitonWithTargetUid:(NSInteger)targetUid actionType:(NSInteger)aciotnType success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//获取故事卡列表
-(void)getStoryCardsListSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取故事卡详情
-(void)getStoryCardsInfoWithCardCode:(NSString*)cardCode Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//邀请好友列表
- (void)getinviteHistorySuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//邀请好友
- (void)inviteHistoyWithInviteCode:(NSString *)inviteCode success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//获取功能页数据
- (void)getFuncPageBuddyListWithBookId:(NSInteger)bookId Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取当前WaWa币
- (void)getMyWawaCoinSuccess:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获取当前可以获得的故事卡
- (void)getAvailableStoryCardWithBookId:(NSInteger)bookId Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获取书内故事卡成功通知服务器
- (void)getStoryCardInBookSuccessWithCardCode:(NSString*)cardCode CardPieceNum:(NSInteger)cardPieceNum Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获取用户创作
- (void)getUserDesignWithTargetUid:(NSInteger)targetUid success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取用户更多创作
- (void)getUserMoreDesignWithTargetID:(NSInteger)targetId moreCode:(NSString *)moreCode pagenIndex:(NSInteger)pageIndex success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取vip兑换配置信息
- (void)getVipSetupInfoSuccess:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//兑换Vip
- (void)exchangeVipWithExchangeID:(NSInteger)exchangeID uccess:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//分享或打分Vip权限奖励 (奖励类型 1分享 2打分)
- (void)shareOrGradeVipReWardWithType:(NSInteger)type Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获得wawa币yaya豆奖励接口
- (void)rewardActionWithActCode:(NSString*)actCode Param:(NSString*)param Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获取用户等级信息
- (void)getUserRankInfoSuccess:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;

//获取他人图书  * String orderBy,//default,hot,newest,name
- (void)getOtherBookWithTargetUid:(NSInteger)targetUid orderby:(NSString *)orderby pageIndex:(NSInteger)pageIndex success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//获取他人收藏
- (void)getOtherFavorWithTargetUid:(NSInteger)targetUid orderby:(NSString *)orderby pageIndex:(NSInteger)pageIndex success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

/**搜索关注/他人 relationType:follow(关注),fan（粉丝） */
- (void)searchFollowRalationWithRalationType:(NSString *)relationType targetUid:(NSInteger)targetUid searchStr:(NSString *)searchStr success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

/** 获取自定义结构图书信息 */
- (void)getBookDefineWithExciteDic:(NSDictionary *)exciteDic pageIndex:(NSInteger)pageIndex OrderBy:(NSString*)orderBy Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;

//签到
//获取今日可能获取的大奖
- (void)getProbablyRewardsSuccess:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//点击签到获取今天的奖励
- (void)getTodayRewardSuccess:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//获取今日奖励的缓存
-(void)getTodayRewardCacheBack:(void (^)(NSDictionary* retDict))cacheBack;
//小知识点赞
- (void)knowledgeLikeWithKnid:(NSInteger)knid IsLike:(NSInteger)like Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//累计签到奖励
- (void)getCumulativeSignRewardWithDays:(NSInteger)days Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;

//扫一扫
- (void)scanCodeWithCodeStr:(NSString *)codeStr success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;
//激活码使用
- (void)activityUseWithCodeStr:(NSString *)codeStr success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//获取阅读器内活动数据
-(void)getReaderInsideActivityInfoWithBookId:(NSInteger)bookId success:(void (^)(NSDictionary * retDict))success failure:(void (^)(NSError *error))failure;

//获取订单列表
-(void)getOrderListWithPage:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//获取作品列表
- (void)getBookAritcleListWithPageIndex:(NSInteger)pageIndex Success:(void (^)(NSDictionary * retDict,BOOL hasCache))success failure:(void (^)(NSError *error,BOOL hasCache))failure cache:(void (^)(NSDictionary * cacheRetDict))cacheBack;
//第三方支付微信
-(void)weChatPayOrderWithParams:(NSDictionary*)payParams Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
//退款接口
-(void)refundWithOrderId:(NSString*)orderId Success:(void (^)(NSDictionary * retDict))success Failure:(void (^)(NSError *error))failure;
@end
